package com.chaokang.dao;

import com.chaokang.dao.entity.AnswerEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AnswerEntityMapper {

    List<AnswerEntity> getAnswerByQuestionId(@Param("q_id") int q_id);
    AnswerEntity getAnswerById(@Param("id") int id);
    int insertAnswer(AnswerEntity answerEntity);
    int updateAnswer(AnswerEntity answerEntity);
    List<AnswerEntity> getAnswerByQuestionIdAndUserId(@Param("questionnaire_id") int q_id,@Param("user_id") int u_id);
    List<Integer> getAllUserIdByQuestionId(@Param("q_id1") int q_id);
    List<AnswerEntity> getAnswerByQuestionnaireId(@Param("q_id") int q_id);
}
